|
![](/i/fill.gif) |
Josh English <eng### [at] spiritone com> wrote:
: Better Nate than Lever... I have a small explination that hopefully will
: help out here:
: http://www.spiritone.com/~english/cyclopedia/smooth2.html
Note that if you use a weighted average to smooth the triangles, you can
get degenerate triangles. This is a bad problem.
For example, suppose that you have a triangle with a normal vector
pointing at <0,1,0> and an adjacent triangle with its normal vector pointing
at <1,-1,0>. Let's say that the area of the first triangle is 10 square
units and the area of the second triangle is 1 square unit.
If we calculate the normal vector of a common vertex using the weighted
average of the triangle normal vectors, it will be:
<0,1,0>*10 + <1,-1,0>*1 = <1,9,0>
If you apply that <1,9,0> as the normal vector to a vertex of the second
triangle, it will be degenerate. That's because the angle between the
normal vector of the second triangle and that <1,9,0> vector is larger
than 90 degrees.
(It can be checked from the dot-product; if the dot-product of the
two vectors is negative, then the triangle is degenerate:
<1,-1,0>.<1,9,0> = 1*1 + (-1)*9 + 0*0 = -8 )
By the way: It's interesting to note that this same problem can appear
even if we use the average of the normalized normal vectors of the triangles.
I have never thoight about that...
However, I would say that the problem is less probable in the latter case.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |